package top.mapper;


import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import top.pojo.User;

public interface UserMapper {

    @Select("select * from login where username = #{username} and password = #{password}")
    User findUser(@Param("username") String username,@Param("password") String password);

    @Insert("insert into login (username,password) values(#{username},#{password}) ")
    void addUser(@Param("username") String username,@Param("password") String password);

    @Select("select * from login where username = #{username}")
    User findUserByUserName(@Param("username") String username);
}
